package com.info.zhiduoduo.repository.dto.invoice;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.info.zhiduoduo.common.excelconverter.IntFlagConverter;
import com.info.zhiduoduo.common.excelconverter.InvoiceTypeConverter;
import com.info.zhiduoduo.common.excelconverter.TaxAcctConverter;
import com.info.zhiduoduo.common.utils.DateUtil;

import java.math.BigDecimal;
import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)  //setter return this;
@ToString
public class InvoiceBriefDto {

	@ExcelIgnore
	@ApiModelProperty("发票id")
	private int id;
	@ExcelProperty("申请编号")
	@ApiModelProperty("申请编号")
	private String applyno;
	@ExcelIgnore
	@ApiModelProperty("项目id")
	private int projectid;
	@ExcelProperty("项目名称")
	@ApiModelProperty("项目名称")
	private String projectname;
	@ExcelIgnore
	@ApiModelProperty("项目类型 1：普通项目 2：智众包项目")
	private Integer projectType;
	@ExcelIgnore
	@ApiModelProperty("创客id")
	private int userid;
	@ExcelIgnore
	@ApiModelProperty("创客姓名")
	private String realname;

	@ExcelProperty("销售方")
	@ApiModelProperty("创客工作室")
	private String username;
	@ExcelProperty(value = "创客临时登陆类型", converter = IntFlagConverter.class)
	@ApiModelProperty("是否为临时登陆类型: 0:否 1:是")
	private Integer temporaryLogin;
	@ExcelIgnore
	@ApiModelProperty("创客开户地 1天津，2共青城，3芜湖，4.普陀山，5徐州")
	private Integer openingLocation;
	@ExcelProperty("创客开户地")
	@ApiModelProperty("创客开户地 1天津，2共青城，3芜湖，4.普陀山，5徐州")
	private String openingLocationName;
	@ExcelIgnore
	@ApiModelProperty("企业id")
	private int compid;
	@ExcelProperty("购买方")
	@ApiModelProperty("企业名")
	private String compname;
	@ExcelProperty("统一社会信用代码")
	@ApiModelProperty("统一社会信用代码")
	private String creditcode;
	@ExcelProperty(value = "发票类型", converter = InvoiceTypeConverter.class)
	@ApiModelProperty("发票类型 1普票 2专票")
	private int invoicetype;
	@ExcelProperty("发票内容")
	@ApiModelProperty("发票内容")
	private String content;

	@ApiModelProperty("开票地ID")
	@ExcelProperty("开票地ID")
	private Integer taxCity;

	@ExcelProperty("开票地")
	@ApiModelProperty("开票地")
	private String taxCityName;
	@ExcelProperty("含税金额")
	@ApiModelProperty("含税金额")
	private BigDecimal invoiceAmount;
	@ExcelProperty(value = "是否开业", converter = TaxAcctConverter.class)
	@ApiModelProperty("是否开业")
	private int taxAcctState;
	@ExcelIgnore
	@ApiModelProperty("线下应付金额(服务费+税费)")
	private BigDecimal payAmount;
	@ExcelIgnore
	@ApiModelProperty("线下支付人: 0:无 1:创客 2:企业")
	private Integer payer;
	@ExcelIgnore
	@ApiModelProperty("线下支付状态: 1:未支付 2:已支付 3:已处理")
	private int offlinePayState;
	@ExcelIgnore
	@ApiModelProperty("汇款凭证")
	private String payReceipt;
	@ExcelIgnore
	@ApiModelProperty("支付时间")
	private Date paytime;
	@ExcelIgnore
	@ApiModelProperty("发票状态 1等待受理 2申请中 3受理中 4已完成(出票) 5被拒绝")
	private int state;
	@ExcelProperty("创建日期")
	private Date createtime;
	@ExcelProperty("项目完成时间")
	private Date projectfinishtime;
	@ExcelProperty("开票时间")
	private Date finishtime;
	@ExcelIgnore
	private Date starttime;
	@ExcelIgnore
	private String remark;
	@ExcelIgnore
	@ApiModelProperty("企业发票备注")
	private String companyRemark;
	@ExcelIgnore
	private int type;
	@ExcelIgnore
	private String email;
	@ExcelIgnore
	private String express;
	@ExcelIgnore
	private String expressno;
	@ExcelIgnore
	@ApiModelProperty("企业策略性开票开关 0:否 1:是")
	private int compStrategyInvoice;
	@ExcelIgnore
	@ApiModelProperty("是否是策略性开票 0:否 1:是")
	private int strategy;
	@ExcelIgnore
	@ApiModelProperty("策略性开票日期")
	private Date strategyDate;
	@ExcelIgnore
	@ApiModelProperty("策略性开票备注")
	private String strategyRemark;
	@ApiModelProperty("运营主体名称")
	@ExcelIgnore
	private String subjectName;

	@ApiModelProperty("发票作废原因")
	@ExcelIgnore
	private String cancellationReason;
	@ApiModelProperty("发票作废证据截图")
	@ExcelIgnore
	private String cancellationEvidence;

	@ExcelIgnore
	@ApiModelProperty("补录时间")
	private Date supplementTime;
	@ApiModelProperty("是否是补录：0：不是，1.是")
	@ExcelIgnore
	private Integer whetherSupplement;
	@ApiModelProperty("补录人员ID")
	@ExcelIgnore
	private Integer supplementPersonnel;

	@JsonFormat(pattern = DateUtil.FORMAT_STYLE_10, timezone = DateUtil.TIME_ZONE_CHINA)
	@ApiModelProperty("申请开票日期, 字符串日期格式: yyyy-MM")
	@ExcelIgnore
	private Date applyInvoiceDate;
	@ApiModelProperty("按协议规定开票 0:否 1:是")
	@ExcelIgnore
	private Integer asProtocol;

	@ApiModelProperty("支付方式ID")
	@ExcelIgnore
	private Integer payId;

	@ApiModelProperty("支付方式名称")
	@ExcelProperty("支付方式")
	private String payName;

	@ApiModelProperty("操作员id")
	@ExcelProperty("操作员id")
	private String managerid;

	@ApiModelProperty("实际发单企业ID")
	@ExcelProperty("实际发单企业ID")
	private Integer actualSender;

	@ApiModelProperty("实际发单企业")
	@ExcelProperty("实际发单企业")
	private String actualCompanyName;

	@ApiModelProperty("是否未开票提醒 0：否，1:是")
	@ExcelProperty(value = "是否未开票提醒", converter = IntFlagConverter.class)
	private Integer unInvoiceRemind;

	@ApiModelProperty("是否首次开票 0：否，1:是")
	@ExcelProperty(value = "是否首次开票", converter = IntFlagConverter.class)
	private Integer firstBilling;

	@ApiModelProperty("是否需要PDF发票开票 0：否，1:是")
	@ExcelIgnore
	private Integer needPdf;

	@ApiModelProperty("特殊需求内容")
	@ExcelIgnore
	private String specialRequirementsContent;

	@ApiModelProperty("季度金额")
	@ExcelIgnore
	private BigDecimal quarterlyAmount;


	@ApiModelProperty("30万审批截图")
	@ExcelIgnore
	private String approvalScreenshot;

	@ApiModelProperty("是否需要30万审批截图")
	@ExcelIgnore
	private Integer isApprovalScreenshot;

}
